Skip to content
This repository has been archived by the owner on Aug 25, 2023. It is now read-only.

Updated go.mod path to /v2 #203

Merged
merged 1 commit into from
Feb 14, 2019
Merged

Updated go.mod path to /v2 #203

merged 1 commit into from
Feb 14, 2019

Conversation

krylovsk
Copy link
Contributor

@krylovsk krylovsk commented Jan 26, 2019

Go modules require use of semver tags (vX.Y.Z) and /vX in the module path for version >=v1.

I've created a tag v2.4.0 in the fork, which seems to be in line with the package version. It can be tested using the replace directive:

require github.com/ahmdrz/goinsta/v2 v2.4.0
replace github.com/ahmdrz/goinsta/v2 => github.com/krylovsk/goinsta/v2 v2.4.0

This fixes #193

@krylovsk krylovsk changed the title Updated go.mod path to /v2 (fixes #193) Updated go.mod path to /v2 (fixes !193) Jan 26, 2019
@krylovsk krylovsk changed the title Updated go.mod path to /v2 (fixes !193) Updated go.mod path to /v2 Jan 26, 2019
@ahmdrz
Copy link
Owner

ahmdrz commented Jan 27, 2019

Hi @krylovsk, I've created a new tag. It's same as your latest tag. Is it enough?

@krylovsk
Copy link
Contributor Author

krylovsk commented Jan 27, 2019

Hi @ahmdrz the go.mod needs to be updated with /v2 as in this PR. Here's an excerpt from Go Module docs:

If the module is version v2 or higher, the major version of the module must be included as a /vN at the end of the module paths used in go.mod files (e.g., module github.com/my/mod/v2, require github.com/my/mod/v2 v2.0.0) and in the package import path (e.g., import "github.com/my/mod/v2/mypkg").

The consumers of the package therefore need to use github.com/ahmdrz/goinsta/v2, e.g. using the README example:

package main

import (
	"fmt"
	"github.com/ahmdrz/goinsta/v2"
)

func main() {
	insta := goinsta.New("user", "pass")
	if err := insta.Login(); err != nil {
		fmt.Println(err)
		return
	}
	fmt.Println(insta.Account)
}

The corresponding go.mod:

module github.com/user/project

require github.com/ahmdrz/goinsta/v2 v2.4.0

I'm not sure how this will affect gopkg.in compatibility, but if understand it right the consumers using gopkg.in and not using go modules should not be affected.

@ahmdrz ahmdrz merged commit 0ba606e into ahmdrz:master Feb 14, 2019
@krylovsk
Copy link
Contributor Author

krylovsk commented Feb 21, 2019

Looks like a new tag v2.4.1 pointing to the updated go.mod needs to be created.
v2.4.0 points to the old github.com/ahmdrz/goinsta.v2 https://github.com/ahmdrz/goinsta/blob/v2.4.0/go.mod

ahmdrz added a commit that referenced this pull request Mar 21, 2019
* implement UserTaggedFeed for media a used is tagged in

* add test for maxid/mintimestamp for UserTaggedFeed

* new response type for usertaggedfeed (#98)

* change UserTaggedFeed return to new type with int64 next_max_id and extra fields

* change test case

* change int -> int64 for next_max_id

* update GetUserStories

* add story to location feeds

* Update README.md

* Added comments to DirectMessage function

* Updated DirectListResponse

* Adapted cursor requests in GetV2Inbox

* Changed doc.go file

* Fixed errors

* Changed doc.go

* Changed examples import

* Changed goinsta imports

* updatd readme

* Updated doc.go

* Updated utils

* Added Comment.Like and Unlike

* Changed requests

* Added Commends.Add support for Stories (incomplete)

* Fixed error with GET request

* Deleted limit parameter

* Resumed code

* Added pagination for Inbox object

* Added next example

* Updated readme

* fixed typo

* Updated README

* Updated README 2

* Added CookieJar in New function

* Fixed hashtag user error

* Fixed #117

* Changed user-agent

* Added Send function to Converstions

* Added new field for requests

* Added send message example

* Added documentation example

* Returned to last user agent. WHY is 44 version older than 10?

* Added new error type and finished Comments.Add to StoryMedia

* Updated example

* Added Delete function

* Added Like function

* Added example

* Added new urls

* Added V2 parameter to request function

* add SyncLikers function to get media likers

* update

* add urlMediaLikers in const and used in SyncLikers

* Added mutual friends field

* Updated user agent

* Added highligh function

* Added highligh example

* Added highlights command to user

* Made SyncLikers a little private heh

* Restored user-agent

* Added Sync function for highlights

* Add go.mod for use with VGO

* Fixed error with highlights

* add UploadPhoto

* Added NewUser function

* Added field title to story media

* Added documentation

* Changed Download function

* Deleted fmt and change for Join paths xd

* Changed Download function

* Updated info command

* Updated Download functions

* Updated

* Changed readme and doc.go

* Updated readme

* Updated readme

* Added GetBest

* Changed Download function flow execution

* Updated setToItem function

* Fixed CarouselMedia error

* Changed AcquireFeed to GetMedia

* Updated exaples

* Changed Feed parameters

* Modified Sync input parameters

* Created friendship example

* Updated doc

* Updated godoc info

* Updated Account.Feed

* Fixed comment const error

* Added Item processing to GetBest

* Fixed comment retrieving error

* Fixed error

* F********************CK

* Fixed comments pagination error

* New login on testing mode

* Little patch to solve #123

* Updated sync example

* Updated Sync account function

* Deleted unneeded const

* Added insecure mode to proxy

* Implemented new login

* Changed close default value by keep-alive

* Deleted second user agent

* Fixed #120

* Fixed highlights error

* Updated readme

* Create CONTRIBUTING.md

* Deleted CONTRIBUTION

* Create LICENSE

* Updated readme

* Updated readme

* [Add] Other examples

* Added edit function in account update functions

* Added urls

* Changed example args

* Limited item listing

* Fixed edit error

* Added Save function

* Fixed _uid paramter error

* Added more information to error

* [Add] Optional argument to modify query options

* This reverts commit b4cd0fb.

* [Add] Open posibility to change to non ranked content

* [Add] Bool in switch and comment

* [Update] Comment typo error

* [Add] New method to have a way to initiate a new conversation

* [Update] Requested changes

* [Update] fix misspell <- found by goreportcard report

* [Update] fix ineffassign <- found by goreportcard report

* [Update] Run gofmt -s <- This was found on goreportcard.com

* Fixed test errors

* [Update] golint fixes reported by goreportcard.com (#135)

* [Update] set 1 of golint fixes reported by goreportcard.com

* [Update] set 2 of golint fixes reported by goreportcard.com

* [Update] set 3 of golint fixes reported by goreportcard.com

* [Update] Adjusted using early return best practice and also to fix the last issues on ineffassign by goreportcard

* Fixed go_vet errors

* [Update] Fix remaining golint issues reported, should be 100% after this

* Added new error reporting types

* Fixed #142

* Made Account.Sync user id independent

* Fixed Save() error

* Added Error function to users

* update Import and Export functions

* Use int64 type for long integers where neccessary (#1)

Closes #149

* Fix unmarshal error on Nametag.SelfieSticker

Fixes #156

* Unmarshall was replaced with json decoder to eliminate the problems of float64 with big numbers

* SelfieSticker from string to interface{} avoiding json error

* Remove duplicated functions

The content of account_test.go can be found in examples/account/

Fixes #155

* Add v2 suffix in go.mod module

* add Feed member.
new function for locationID search added

* feedTag moved to Feed

* [Add Example] See who doesn't follow back

* Unfollow everyone

* add SetController for User struct

* rename SetController to SetInstagram

* Update types.go fix Nametag problem (#177)

* Fix file name for downloading (#182)

* update Gradient in Nametag

* Update README.md (#185)

* Constacts synchronization added (#184)

Ability to search users by emails and mobile phones

* Media sync (#197)

* Fix: error 405 for media.sync when request with POST

* Media: create setter for instagram

* fix #199 & #201 type mismatch (#200)

* Update newconversation.go

* Update types.go

* using json number (#202)

* update README

* Update CONTRIBUTING.md

* Fixed type of LastSeenAt in Conversion struct

* Added iterating over pending inbox messages

* Updated go.mod path to /v2 (#203)

* Fix comments pagination

* Fix wrong datatype (#208)

* Fix interface{} unmarshalling

* Improves hashtags isolation/recognition

* minor changes

* Update README.md

* Update inbox.go

Fixes #213

* Remove not used import
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problem downloading package into project using go modules
2 participants